package com.wx.lambda;

import cn.hutool.core.lang.copier.Copier;
import cn.hutool.core.lang.func.Func1;

import java.io.File;
import java.util.Arrays;
import java.util.Objects;

/**
 * @description:
 * @author: wangxun
 * @createDate: 2021/12/28
 * @version: 1.0
 */
public class DoubleMao {
    private int i;

    public int getI() {
        return i;
    }

    public void setI(int i) {
        this.i = i;
    }

    public static void main(String[] args) {
        File[] files = new File(".").listFiles();
        Arrays.stream(files).filter(File::isFile).
                map(File::getName).forEach(System.out::println);

        System.out.println("=================");
        Arrays.stream(files).filter(File::isDirectory)
                .flatMap(file -> Arrays.stream(Objects.requireNonNull(file.listFiles())))
                .map(File::getName).forEach(System.out::println);
    }
}
